// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

//引入ElementUI【安装后别忘记引入哦】
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

//引入axios - 发送异步请求
import axios from "axios";
//配置axios的基础路径：每次发送axios请求之前，都要加上这个基础路径
axios.defaults.baseURL='https://www.fastmock.site/mock/8d8869097fede93f17eef4a0bf2e8e0a/pethome';
//配置axios的全局属性：在.vue页面中不用再引入axios，使用this.$http获取axios对象
Vue.prototype.$http=axios;//$http赋值为axios

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
